<?php foreach ($datas as $date ):?>
                <tr>
                  <td><?php echo $date['sku']?> </td>
                  <td><?php echo $date['sku_name'] ?> </td>
                  <td><?php echo $date['storage_position'] ?> </td>
                  <td><?php echo $date['pd_time'] ?></td>
                  <td><?php echo $date['download_time'] ?> </td>
                  <td><?php echo $date['upload_time'] ?> </td>
                  <td><?php echo Pandian::getpandiantpyeByid($date['status'])?></td>
                  <td <?php if($date['quantity3']!= $date['quantity2'])echo "class='yellow'"; ?>><?php echo $date['quantity2'] ?></td>
                  <td <?php if($date['quantity3']!= $date['quantity2'])echo "class='yellow'"; ?>><?php echo $date['quantity3'] ?></td>
                  <td><?php echo $date['quantity'] ?></td>
                  <td class='num'><?php echo $date['num'] ?></td>
                  <td ><?php echo Erpuser::nick_by_id($date['user_id']) ?></td>
                </tr>
<?php endforeach;?>
<tr>
      <td colspan="6" style="display: none;"><div class="mypage"><?php echo $pager_links;?></div> </td>
</tr>
<script src="<?php echo URL::base() ?>media/vendor/js/jquery-1.10.2.js"></script>
<script type="text/javascript">
$(function(){
	 $('.num').each(function(){
	     var num= parseInt($(this).text()); 
	     if(num>0)
	     {
	    	 $(this).css('background-color','green');   
	     }
	     if(num < 0){
	    	 $(this).css('background-color','red'); 
	     }
		 });

});
</script>